package com.adlun.sort.insert;

import com.adlun.sort.util.DataUtil;

public class Insert {

	public static void main(String[] args) {
		int[] nums = DataUtil.getIntArray();
		System.out.println(java.util.Arrays.toString(nums));
		for (int i = 1; i < nums.length; i++) {
			int tmp = nums[i];
			int j = i - 1;
			while (j >= 0 && nums[j] > tmp) {
				nums[j + 1] = nums[j];
				j--;
			}
			nums[j + 1] = tmp;
			System.out.println(java.util.Arrays.toString(nums));
		}
		System.out.println(java.util.Arrays.toString(nums));
	}
}
